<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:i="http://java.sun.com/jsf/composite/components">

<ui:composition
	template="resources/styles/#{cachedInfo.styleInUse.id}/templates/master_layout.html">
	<ui:define name="content">
			<h:outputText rendered="#{gestioneLocali.isEmpty()}" value="Nessun locale presente"/>
			<h:dataTable value="#{gestioneLocali.locali}" var="l"
				styleClass="pref_table" headerClass="pref_th"
				rowClasses="pref_td_odd, pref_td_even" rendered="#{gestioneLocali.isNotEmpty()}">

				<h:column>
					<f:facet name="header">ID</f:facet>
	    			#{l.id}
	    		</h:column>
				<h:column>
					<f:facet name="header">Local Name</f:facet>
	   				#{l.name}
	   			</h:column>
				<h:column>
					<f:facet name="header">Description</f:facet>
	   				#{l.desc}
	   			</h:column>
				<h:column>
					<f:facet name="header">Address</f:facet>
	   				#{l.address}
	   			</h:column>
				<h:column>
					<f:facet name="header"></f:facet>
					<h:commandLink action="#{gestioneLocali.delete(l)}">
						<h:graphicImage library="images" name="delete.gif" />
					</h:commandLink>
					<h:commandLink action="#{gestioneLocali.modify(l)}">
						<h:graphicImage library="images" name="modify.gif" />
					</h:commandLink>
				</h:column>
			</h:dataTable>
		</h:form>
		<h:link value="Aggiungi locale"
			outcome="/resources/pages/preferences/aggiungi_locale_form" />
	</ui:define>
</ui:composition>
</html>